package org.example.utils;

import java.util.Locale;
import java.util.ResourceBundle;

public class ReadConf {
    public static void main(String[] args) {
        readConf("userNameForQcdz");
        readConf("userPasswordForQcdz");
        String host = readConf("host");
        System.out.println("取到的host地址是： " + host);


    }
    public static String getHost(){

        String host = readConf("host");
        return host;
    }
    public static String getHost1(){

        String erphost = readConf("erphost");
        return erphost;
    }



    public static String readConf(String key){
         ResourceBundle bundle =
                ResourceBundle.getBundle("application", Locale.CHINA);
         String host = bundle.getString(key);

//        System.out.println(host);
        return host;

    }


}
